const moment=require('moment')//第三份模块
const customFn=require('./custom.js')//核心板块
const os=require('os') 
const path=require('path')
const url =require('url')
const fs=require('fs')
console.log('准备打开文件')
fs.open('demo.txt','r+',function(err,fd){
  if(err){
    return console.error(err)
  }
  console.log('文件打开')
})
console.log(moment().format('YYYY-MM-DD HH:mm:ss'))

console.log(__filename)
console.log(path.basename(__filename))
console.log(path.extname(__filename))
console.log(path.dirname(__filename))
console.log(__dirname)
const myurl=url.parse('https://www.baidu.com/')
console.log(myurl.hostname)
// console.log('hello node')
// console.log(typeof customFn(2))
// console.log(os.release())
